package org.ponly.lpf4j;

import java.io.File;
import java.io.IOException;

/**
 * 插件管理器
 *
 * @author vacoor
 */
public interface PluginManager {

    void initialize();

    void destroy();

    boolean hasAnyExtensions(Class<?> extensionPoint);

    <E> E getExtension(Class<E> extensionPoint);

    <E> E[] getExtensions(Class<E> extensionPoint);

    PluginDescriptor[] getPlugins();

    PluginDescriptor[] getActivePlugins();

    PluginDescriptor[] getUnresolvedPlugins();

    PluginDescriptor getPlugin(String pluginId);

    boolean enablePlugin(String pluginId);

    boolean disablePlugin(String pluginId);

    boolean installPlugin(File pluginFile) throws IOException;

    boolean uninstallPlugin(String pluginId) throws IOException;

}
